/**
 * 
 */
package com.jushu.storbox.service;

import java.util.HashMap;
import java.util.List;

import android.content.Context;
import android.os.Handler;
import android.view.View;

import com.jushu.storbox.entities.FileFolderInfo;
import com.jushu.storbox.entities.FolderInfo;
import com.huawei.sharedrive.sdk.android.modelV2.response.FolderResponse;

public interface IlocalFolderService extends ILocalService {
	/**
	 * @param folderInfo
	 */
	public void insertFolder(FolderResponse folderResponse ,int syncStu);

	/**
	 * @param folderInfo
	 */
	public void updateFolder(FolderResponse folderResponse);

	/**
	 * @param folderInfo
	 */
	public void updateFolder(FolderInfo folderInfo);

	/**
	 * @param folderInfo
	 */
	public void insertOrUpdateFolder(FolderResponse folderResponse);

	/**
	 * @param folderId
	 * @return
	 */
	public List<FolderInfo> getFolderList(String ownerId, String folderId);
	
	public HashMap<String, FolderInfo> getMappedFolderDatas(String ownerId, String folderId);
	/**
	 * @param folderId
	 * @return
	 */
	public List<FolderInfo> getFolderListPage(String ownerId, String folderId);

	/**
	 * @param id
	 */
	public void deleteFolderAndChild(FileFolderInfo folder);

	public void deleteFolderAndChildVirtual(FileFolderInfo folder);
	/**
	 * 
	 * @param context
	 * @param name
	 */
	public FileFolderInfo renameFolder(FolderResponse folderResponse ,FileFolderInfo fileInformation);

	/**
	 * @param context
	 * @param parentID
	 * @param FolderID
	 */
	public void moveFolder(String ownerId, String parentID, String FolderID);

	/**
	 * @return
	 */
	public FolderInfo getFolderById(FileFolderInfo fileFolderInfo);
	
	/**
	 * @return
	 */
	public FolderInfo getFolderById(String ownerId, String folderId);

	/**
	 * @param folderId
	 * @param localPath
	 */
	public void updateLocalPath(String ownerId, String folderId, String localPath);

	/**
	 * @param status
	 * @param folder
	 */
	public void updateTransStatus(int status, String ownerId, String folderId);

	/**
	 * @param syncStatus
	 * @param folderId
	 */
	public int updateSyncStatus(int syncStatus, String ownerId, String folderId);
	
	/**
	 * @param folderId
	 * @param folderName
	 * @param itemView
	 */
	public void syncFolder(FileFolderInfo info, String folderName,String parentId,Handler handler,View itemView);
	
	/**
	 * @param folderId
	 * @param folderName
	 */
	public void cancelSyncFolder(String ownerId, String folderId,String folderName);

	/**
	 * @param folderId
	 */
	public void updateLastRefreshTime(String ownerId, String folderId);

	/**
	 * @param folderId
	 * @return
	 */
	public long getLastRefreshTime(String ownerId, String folderId);
	
	public FileFolderInfo getDatabaseFolderByName(Context context, String ownerId, String folderName);
	
	public List<FileFolderInfo> searchInDB(String ownerId, String fileName,Context context);
	
}
